package com.yangyu.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @Description:
 * @Company：乙盟信息
 * @Author: jiangheng
 * @Date: 2022/1/24 16:55
 * @Version 1.0
 */
@Data
public class Message {
    /**
     * 主键ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String id;
    @JsonSerialize(using = ToStringSerializer.class)
    private String userId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String content;
    @JsonSerialize(using = ToStringSerializer.class)
    private String parentId;

    private String  avatar;

    private String userName;

    /**
     * 子评论
     */
    private List<Message> childComments;
}
